/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * All Rights Researved.
 *
 * This library is developed and distributed for free usage,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * You can redistribute and/or modify it under the terms of the
 * Simplified BSD License
 *
 *
 *
 *
 *
 *
 *
 *
 * @Original Author: jin Chen
 * @date: Apr 14, 2004$
 * @version: 1.0
 */
package edu.psu.geovista.app.dataloader.v1.gui;

import edu.psu.geovista.app.dataloader.v1.DataLoaders;
import edu.psu.geovista.common.utils.ArrayUtils;

import javax.swing.*;
import javax.swing.border.TitledBorder;
import java.awt.*;

public class ProjectNameListPane extends ProjectPane {
    ProjectNamesPane pname;
    private JLabel instruction;

    public void setProjectNames(String [] name){
        ArrayUtils.sortIgnoreCase(name);
        pname.setProjectNames(name);
    }



    public String getSelectedProjectName() {
        return pname.getSelectProjectName() ;
    }
    public ProjectNameListPane(DataLoaders dataloader) {
            super(dataloader);

             //final SessionPane  sesp=new SessionPane();
             pname=new edu.psu.geovista.app.dataloader.v1.gui.ProjectNamesPane();
        //new javax.swing.border.TitledBorder(null, "Please specify a name for your project:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, DataLoaders.FONT_SECTION_TITLE,DataLoaders.COLOR_SECTION_TITLE
         TitledBorder border = new javax.swing.border.TitledBorder(null, "Choose a project", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, DataLoaders.FONT_PAGE_TITLE,DataLoaders.COLOR_SECTION_TITLE);//("Choose a project");
        //border.setTitleFont(new Font(""));
        border.setTitleColor(DataLoaders.COLOR_SECTION_TITLE);
        pname.setBorder(border);


             this.setLayout(new BorderLayout());
             add(pname);
             add(this.getControlPane(), BorderLayout.SOUTH );


    }
}
